﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Security.Authentication;
using System.Web.Security;
namespace AteckCsharp.Account
{
    public partial class Registration : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void ContinueButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("ManageUsers.aspx");
        }

        protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
        {

            SqlDataSource insertAddress = (SqlDataSource)CreateUserWizardStep0.FindControl("CreateUserProfile");
            MembershipUser user = Membership.GetUser(CreateUserWizard1.UserName);
            object userGuid = user.ProviderUserKey;
            insertAddress.InsertParameters.Add("UserId", userGuid.ToString());
            //insertAddress.InsertParameters.Add("Street", txtStreet.Text);
            //insertAddress.InsertParameters.Add("City", txtCity.Text);
            //insertAddress.InsertParameters.Add("State", txtState.Text);
            //insertAddress.InsertParameters.Add("Zip", txtZip.Text);
            insertAddress.Insert();
            
        }
    }
}